package com.sky.Controller;

import com.sky.Entity.PushManage;
import com.sky.Push.PushTread;
import com.sky.Util.JsonHelper;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by sun on 2017-06-16.
 */
@RestController
@RequestMapping(value = "push")
public class PushController {

    @RequestMapping(value = "push_all",method = RequestMethod.POST)
    String pushAll(@RequestBody PushManage pushManage) {

        Thread t = new Thread(new PushTread(pushManage));
        t.start();

        return JsonHelper.toJSONString(0,"push all client start");
    }
}
